#include<iostream>
#include<string>
using namespace std;
#include<fstream>

//

void test01()
{
	ofstream ofs;

	ofs.open("file.txt", ios::out);

	ofs << "name:" << "Jerry" << endl;
	ofs << "age:" << "12" << endl;
	ofs << "adress:" << "Mars" << endl;

	ofs.close();
}

void test02()
{
	ofstream ofs;

	ofs.open("file.txt", ios::out);

	ofs << "name:" << "Tom" << endl;
	ofs << "age:" << "14" << endl;
	ofs << "adress:" << "M" << endl;

	ofs.close();
}

int main()
{
	test01();
	test02();

	system("pause");
	return 0;
}